package com.kt.dion.golf.view.info;

import java.awt.event.KeyEvent;
import java.util.Hashtable;

import com.kt.dion.golf.data.ItemData;
import com.kt.dion.golf.manager.AppManager;

public class TypeADepth2ListCanvas extends ListTypeCanvas
{
	public TypeADepth2ListCanvas(AppManager appManager)
	{
		super(appManager);
	}

	public void init()
	{
		title = (String) menuData.getData("title");
		imgIcon = "m_01_icon.png";
	}

	public boolean keyPressed(int keyCode)
	{
		boolean isUsekey = true;

		switch (keyCode)
		{
			case KeyEvent.VK_UP:
			case KeyEvent.VK_DOWN:
				focusManager.moveFocus(keyCode);
				break;

			case KeyEvent.VK_ENTER:

				ItemData itemData = menuData.getItem(focusManager.getIdxData());

				Hashtable htData = new Hashtable();
				htData.put("data", itemData);

				appManager.callNextCanvas("A_Depth3", htData, false);
				break;

			case VK_BACK:
				appManager.removeCanvas();
				break;

			default:
				isUsekey = false;
				break;
		}
		return isUsekey;
	}
}
